/**
 * 获取任务类型
 */
export function useTaskType () {
  const taskTypeList = ref([{
    label: '浏览任务',
    value: 'internal',
  }, {
    label: '外部任务',
    value: 'external'
  }])

  const getTaskTypeLabel = (value: string) => {
    return taskTypeList.value.find((item) => item.value === value)?.label ?? value
  }

  return {
    taskTypeList,
    getTaskTypeLabel
  }
}
